<?php

namespace app\controller\admin;

use app\common\model\Admin;
use app\common\model\Authentication;
use app\common\service\HelpStaticService;
use app\controller\admin\AdminBaseController;
use think\annotation\route\Group;
use think\annotation\route\Post;
use think\annotation\route\Route;

#[Group('admin/test')]
class Test extends AdminBaseController
{
    #[Route('GET', 'createHelpStatic')]
    public function createHelpStatic()
    {
        HelpStaticService::instance()->create();
    }

    #[Route('GET', 'test1')]
    public function test1()
    {
        $admin = Admin::find(5);
        $admin->getMyAreaCodeList();
    }

    #[Route('GET', 'test2')]
    public function test2()
    {
        $authList = Authentication::where("id", ">", "80")->select();
        foreach ($authList as $key => $value) {
            $value->autoFixedAreaCode();
            echo $value->save();
            echo "\r\n<br/>";
        }

    }

}